<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
  <title>精品咖啡连锁品牌招商加盟 - 商机详情</title>
  <!-- Bootstrap 5 CSS -->
  <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
  <!-- Font Awesome -->
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/font-awesome@4.7.0/css/font-awesome.min.css">
  
  <style>
    body {
      background-color: #f5f5f5;
      font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
      padding-bottom: 70px;
    }
    
    /* 顶部导航 */
    .top-nav {
      background-color: white;
      padding: 12px 15px;
      box-shadow: 0 2px 5px rgba(0,0,0,0.05);
      position: sticky;
      top: 0;
      z-index: 100;
    }
    
    .nav-title {
      font-size: 18px;
      font-weight: 600;
      text-align: center;
      margin: 0;
    }
    
    /* 图片展示区 */
    .image-gallery {
      position: relative;
      background-color: #000;
    }
    
    .gallery-image {
      width: 100%;
      height: 240px;
      object-fit: cover;
    }
    
    .image-count {
      position: absolute;
      right: 10px;
      top: 10px;
      background-color: rgba(0,0,0,0.5);
      color: white;
      font-size: 12px;
      padding: 3px 8px;
      border-radius: 12px;
    }
    
    .gallery-nav {
      position: absolute;
      bottom: 10px;
      left: 0;
      right: 0;
      display: flex;
      justify-content: center;
      gap: 6px;
    }
    
    .gallery-dot {
      width: 8px;
      height: 8px;
      border-radius: 50%;
      background-color: rgba(255,255,255,0.5);
    }
    
    .gallery-dot.active {
      background-color: white;
    }
    
    /* 项目标题区 */
    .project-header {
      background-color: white;
      padding: 15px;
      border-bottom: 1px solid #eee;
    }
    
    .project-title {
      font-size: 20px;
      font-weight: 600;
      color: #333;
      margin-bottom: 10px;
      line-height: 1.3;
    }
    
    .project-tags {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
      margin-bottom: 12px;
    }
    
    .project-tag {
      padding: 4px 10px;
      border-radius: 4px;
      font-size: 13px;
    }
    
    .tag-food {
      background-color: #fff1f0;
      color: #ff4d4f;
    }
    
    .tag-hot {
      background-color: #fff2e8;
      color: #fa541c;
    }
    
    /* 核心信息卡片 */
    .info-card {
      background-color: white;
      margin: 10px;
      border-radius: 12px;
      padding: 15px;
      box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    }
    
    .info-title {
      font-size: 16px;
      font-weight: 600;
      color: #333;
      margin-bottom: 12px;
      padding-bottom: 8px;
      border-bottom: 1px solid #eee;
    }
    
    .info-row {
      display: flex;
      justify-content: space-between;
      padding: 10px 0;
      border-bottom: 1px dashed #eee;
    }
    
    .info-row:last-child {
      border-bottom: none;
    }
    
    .info-label {
      color: #666;
      font-size: 14px;
    }
    
    .info-value {
      color: #333;
      font-size: 14px;
      font-weight: 500;
      text-align: right;
    }
    
    .highlight {
      color: #2c6ecb;
    }
    
    /* 项目详情内容 */
    .project-content {
      background-color: white;
      margin: 10px;
      border-radius: 12px;
      padding: 15px;
      box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    }
    
    .content-section {
      margin-bottom: 20px;
    }
    
    .section-title {
      font-size: 16px;
      font-weight: 600;
      color: #333;
      margin-bottom: 10px;
      display: flex;
      align-items: center;
    }
    
    .section-title i {
      margin-right: 8px;
      color: #2c6ecb;
    }
    
    .content-text {
      font-size: 15px;
      color: #555;
      line-height: 1.6;
      margin-bottom: 15px;
    }
    
    .content-image {
      width: 100%;
      border-radius: 8px;
      margin: 10px 0;
    }
    
    /* 操作按钮区 */
    .action-buttons {
      position: fixed;
      bottom: 0;
      left: 0;
      right: 0;
      background-color: white;
      border-top: 1px solid #eee;
      padding: 10px;
      display: flex;
      gap: 10px;
      z-index: 90;
    }
    
    .action-btn {
      flex: 1;
      padding: 10px 0;
      border-radius: 8px;
      font-size: 15px;
      font-weight: 500;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 6px;
    }
    
    .btn-secondary {
      background-color: #f5f7fa;
      color: #333;
      border: none;
    }
    
    .btn-primary {
      background-color: #2c6ecb;
      color: white;
      border: none;
    }
    
    /* 留言区 */
    .comments-section {
      background-color: white;
      margin: 10px;
      border-radius: 12px;
      padding: 15px;
      box-shadow: 0 1px 3px rgba(0,0,0,0.05);
      margin-bottom: 80px;
    }
    
    .comments-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 15px;
    }
    
    .comments-title {
      font-size: 16px;
      font-weight: 600;
      color: #333;
    }
    
    .comments-count {
      color: #2c6ecb;
    }
    
    /* 留言输入框 */
    .comment-input-container {
      display: flex;
      gap: 10px;
      margin-bottom: 20px;
    }
    
    .user-avatar {
      width: 36px;
      height: 36px;
      border-radius: 50%;
      background-color: #e8f4fd;
      display: flex;
      align-items: center;
      justify-content: center;
      color: #2c6ecb;
      font-weight: 600;
    }
    
    .comment-input {
      flex: 1;
      border: 1px solid #eee;
      border-radius: 20px;
      padding: 8px 15px;
      font-size: 14px;
      outline: none;
    }
    
    .send-comment {
      width: 36px;
      height: 36px;
      border-radius: 50%;
      background-color: #2c6ecb;
      color: white;
      border: none;
      display: flex;
      align-items: center;
      justify-content: center;
    }
    
    /* 留言列表 */
    .comments-list {
      margin-top: 15px;
    }
    
    .comment-item {
      display: flex;
      gap: 10px;
      padding: 10px 0;
      border-bottom: 1px solid #f5f5f5;
    }
    
    .comment-avatar {
      width: 40px;
      height: 40px;
      border-radius: 50%;
      object-fit: cover;
    }
    
    .comment-content {
      flex: 1;
    }
    
    .comment-header {
      display: flex;
      justify-content: space-between;
      margin-bottom: 5px;
    }
    
    .comment-author {
      font-size: 14px;
      font-weight: 500;
      color: #333;
    }
    
    .comment-time {
      font-size: 12px;
      color: #999;
    }
    
    .comment-text {
      font-size: 14px;
      color: #555;
      margin-bottom: 8px;
    }
    
    .comment-actions {
      display: flex;
      gap: 15px;
      font-size: 12px;
    }
    
    .comment-action {
      color: #999;
      display: flex;
      align-items: center;
      gap: 4px;
    }
    
    .comment-action.active {
      color: #2c6ecb;
    }
    
    /* 回复列表 */
    .replies-list {
      margin-left: 20px;
      margin-top: 10px;
      background-color: #f9f9f9;
      border-radius: 8px;
      padding: 10px;
    }
    
    .reply-item {
      margin-bottom: 10px;
    }
    
    .reply-item:last-child {
      margin-bottom: 0;
    }
    
    .reply-header {
      display: flex;
      justify-content: space-between;
      margin-bottom: 3px;
    }
    
    .reply-author {
      font-size: 13px;
      font-weight: 500;
      color: #333;
    }
    
    .reply-time {
      font-size: 11px;
      color: #999;
    }
    
    .reply-text {
      font-size: 13px;
      color: #555;
    }
    
    /* 展开/收起回复 */
    .toggle-replies {
      font-size: 13px;
      color: #2c6ecb;
      background: none;
      border: none;
      padding: 5px 0;
      margin-top: 5px;
      display: flex;
      align-items: center;
      gap: 5px;
    }
    
    /* 联系表单弹窗 */
    .modal-backdrop {
      position: fixed;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      background-color: rgba(0,0,0,0.5);
      z-index: 1000;
      display: none;
      align-items: flex-end;
      justify-content: center;
    }
    
    .modal-content {
      width: 100%;
      background-color: white;
      border-radius: 16px 16px 0 0;
      padding: 20px;
      max-height: 80vh;
      overflow-y: auto;
      transform: translateY(100%);
      transition: transform 0.3s;
    }
    
    .modal-backdrop.show {
      display: flex;
    }
    
    .modal-backdrop.show .modal-content {
      transform: translateY(0);
    }
    
    .modal-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 20px;
    }
    
    .modal-title {
      font-size: 18px;
      font-weight: 600;
      color: #333;
    }
    
    .close-modal {
      background: none;
      border: none;
      font-size: 20px;
      color: #999;
    }
    
    .form-group {
      margin-bottom: 15px;
    }
    
    .form-label {
      display: block;
      font-size: 14px;
      color: #333;
      margin-bottom: 5px;
    }
    
    .form-control {
      width: 100%;
      padding: 10px 15px;
      border-radius: 8px;
      border: 1px solid #ddd;
      font-size: 14px;
    }
    
    .submit-btn {
      width: 100%;
      padding: 12px;
      border-radius: 8px;
      background-color: #2c6ecb;
      color: white;
      border: none;
      font-size: 16px;
      font-weight: 500;
      margin-top: 10px;
    }
  </style>
</head>
<body>
  <!-- 顶部导航 -->
  <div class="top-nav d-flex justify-content-between align-items-center">
    <button class="btn btn-link p-0 text-dark" onclick="history.back()">
      <i class="fa fa-arrow-left"></i>
    </button>
    <h1 class="nav-title">项目详情</h1>
    <div class="d-flex gap-2">
      <button class="btn btn-link p-0 text-dark" id="share-btn">
        <i class="fa fa-share-alt"></i>
      </button>
      <button class="btn btn-link p-0 text-dark" id="favorite-btn">
        <i class="fa fa-heart-o"></i>
      </button>
    </div>
  </div>
  
  <!-- 图片展示区 -->
  <div class="image-gallery">
    <img src="https://picsum.photos/800/600?random=20" alt="咖啡品牌加盟" class="gallery-image">
    <div class="image-count">1/5</div>
    <div class="gallery-nav">
      <div class="gallery-dot active"></div>
      <div class="gallery-dot"></div>
      <div class="gallery-dot"></div>
      <div class="gallery-dot"></div>
      <div class="gallery-dot"></div>
    </div>
  </div>
  
  <!-- 项目标题区 -->
  <div class="project-header">
    <h1 class="project-title">精品咖啡连锁品牌招商加盟 全程扶持创业</h1>
    <div class="project-tags">
      <span class="project-tag tag-food">餐饮美食</span>
      <span class="project-tag">品牌连锁</span>
      <span class="project-tag">低风险</span>
      <span class="project-tag tag-hot">热门项目</span>
    </div>
    <div class="d-flex gap-10 text-sm text-gray-600">
      <div><i class="fa fa-eye"></i> 1.2k人浏览</div>
      <div><i class="fa fa-line-chart"></i> 成功率92%</div>
      <div><i class="fa fa-clock-o"></i> 3天前更新</div>
    </div>
  </div>
  
  <!-- 核心信息卡片 -->
  <div class="info-card">
    <h3 class="info-title">加盟核心信息</h3>
    <div class="info-row">
      <div class="info-label">投资金额</div>
      <div class="info-value highlight">10-20万</div>
    </div>
    <div class="info-row">
      <div class="info-label">招商地区</div>
      <div class="info-value">全国</div>
    </div>
    <div class="info-row">
      <div class="info-label">加盟类型</div>
      <div class="info-value">品牌加盟</div>
    </div>
    <div class="info-row">
      <div class="info-label">成立时间</div>
      <div class="info-value">2015年</div>
    </div>
    <div class="info-row">
      <div class="info-label">门店数量</div>
      <div class="info-value highlight">200+家</div>
    </div>
    <div class="info-row">
      <div class="info-label">适合人群</div>
      <div class="info-value">首次创业、小本创业</div>
    </div>
  </div>
  
  <!-- 项目详情内容 -->
  <div class="project-content">
    <div class="content-section">
      <h3 class="section-title"><i class="fa fa-info-circle"></i> 项目介绍</h3>
      <p class="content-text">
        我们是国内知名咖啡连锁品牌，专注于为消费者提供高品质咖啡和舒适的休闲空间。自2015年成立以来，已在全国范围内开设200多家门店，品牌影响力持续扩大。
      </p>
      <p class="content-text">
        现面向全国诚招加盟商，我们提供从选址评估、店面装修、人员培训到运营管理的一站式扶持，帮助创业者轻松开启自己的咖啡店事业。
      </p>
      <img src="https://picsum.photos/800/400?random=21" alt="咖啡店环境" class="content-image">
    </div>
    
    <div class="content-section">
      <h3 class="section-title"><i class="fa fa-thumbs-up"></i> 加盟优势</h3>
      <p class="content-text"><strong>1. 品牌支持</strong>：统一品牌形象，全国性品牌推广，提升门店知名度和影响力。</p>
      <p class="content-text"><strong>2. 产品保障</strong>：专业研发团队，定期推出新品，优质原材料供应，确保产品品质。</p>
      <p class="content-text"><strong>3. 运营指导</strong>：经验丰富的运营团队提供全程指导，包括开业筹备、日常运营等。</p>
      <p class="content-text"><strong>4. 培训体系</strong>：系统化的培训课程，涵盖咖啡制作、服务标准、门店管理等。</p>
      <p class="content-text"><strong>5. 营销支持</strong>：提供节日营销方案、线上推广支持，助力门店提升业绩。</p>
    </div>
    
    <div class="content-section">
      <h3 class="section-title"><i class="fa fa-list-alt"></i> 加盟流程</h3>
      <p class="content-text"><strong>1. 咨询了解</strong>：通过电话、在线咨询等方式了解项目详情</p>
      <p class="content-text"><strong>2. 提交申请</strong>：填写加盟申请表，提交相关资料</p>
      <p class="content-text"><strong>3. 资质审核</strong>：总部审核加盟商资质和选址</p>
      <p class="content-text"><strong>4. 签订合同</strong>：审核通过后，签订加盟合同</p>
      <p class="content-text"><strong>5. 门店筹备</strong>：进行店面装修、人员培训等筹备工作</p>
      <p class="content-text"><strong>6. 开业运营</strong>：正式开业，总部提供后续支持</p>
      <img src="https://picsum.photos/800/400?random=22" alt="加盟流程" class="content-image">
    </div>
  </div>
  
  <!-- 留言区 -->
  <div class="comments-section">
    <div class="comments-header">
      <h3 class="comments-title">用户留言 <span class="comments-count">(12)</span></h3>
    </div>
    
    <!-- 留言输入框 -->
    <div class="comment-input-container">
      <div class="user-avatar">我</div>
      <input type="text" class="comment-input" placeholder="有什么想了解的？请留言...">
      <button class="send-comment">
        <i class="fa fa-paper-plane"></i>
      </button>
    </div>
    
    <!-- 留言列表 -->
    <div class="comments-list">
      <!-- 留言1 -->
      <div class="comment-item">
        <img src="https://picsum.photos/100/100?random=30" alt="用户头像" class="comment-avatar">
        <div class="comment-content">
          <div class="comment-header">
            <div class="comment-author">张先生</div>
            <div class="comment-time">2天前</div>
          </div>
          <div class="comment-text">请问加盟费包含哪些内容？设备是自己购买还是总部统一提供？</div>
          <div class="comment-actions">
            <button class="comment-action"><i class="fa fa-thumbs-o-up"></i> 12</button>
            <button class="comment-action"><i class="fa fa-reply"></i> 回复</button>
          </div>
          
          <!-- 回复列表 -->
          <div class="replies-list">
            <div class="reply-item">
              <div class="reply-header">
                <div class="reply-author">品牌官方</div>
                <div class="reply-time">1天前</div>
              </div>
              <div class="reply-text">您好，加盟费包含品牌授权、技术培训、开业指导等。设备由总部统一提供，确保品质一致，费用另计。</div>
            </div>
          </div>
        </div>
      </div>
      
      <!-- 留言2 -->
      <div class="comment-item">
        <img src="https://picsum.photos/100/100?random=31" alt="用户头像" class="comment-avatar">
        <div class="comment-content">
          <div class="comment-header">
            <div class="comment-author">李女士</div>
            <div class="comment-time">5天前</div>
          </div>
          <div class="comment-text">我在三线城市，适合开你们的加盟店吗？大概需要多少平米的店面？</div>
          <div class="comment-actions">
            <button class="comment-action"><i class="fa fa-thumbs-o-up"></i> 8</button>
            <button class="comment-action"><i class="fa fa-reply"></i> 回复</button>
          </div>
          
          <!-- 回复列表 -->
          <div class="replies-list">
            <div class="reply-item">
              <div class="reply-header">
                <div class="reply-author">品牌官方</div>
                <div class="reply-time">4天前</div>
              </div>
              <div class="reply-text">我们的品牌在三线城市有很好的发展前景，目前已有多家成功案例。建议店面面积在50-80平米左右。</div>
            </div>
            <div class="reply-item">
              <div class="reply-header">
                <div class="reply-author">王老板</div>
                <div class="reply-time">3天前</div>
              </div>
              <div class="reply-text">我在五线城市开的，生意还不错，总部支持很到位。</div>
            </div>
          </div>
        </div>
      </div>
      
      <!-- 留言3 -->
      <div class="comment-item">
        <img src="https://picsum.photos/100/100?random=32" alt="用户头像" class="comment-avatar">
        <div class="comment-content">
          <div class="comment-header">
            <div class="comment-author">赵先生</div>
            <div class="comment-time">1周前</div>
          </div>
          <div class="comment-text">从签约到开业大概需要多长时间？总部会帮忙做市场调研吗？</div>
          <div class="comment-actions">
            <button class="comment-action"><i class="fa fa-thumbs-o-up"></i> 5</button>
            <button class="comment-action"><i class="fa fa-reply"></i> 回复</button>
          </div>
          
          <!-- 回复列表 -->
          <div class="replies-list">
            <div class="reply-item">
              <div class="reply-header">
                <div class="reply-author">品牌官方</div>
                <div class="reply-time">6天前</div>
              </div>
              <div class="reply-text">从签约到开业一般需要1-2个月，具体看店面装修进度。总部会提供选址评估和当地市场分析报告。</div>
            </div>
          </div>
        </div>
      </div>
      
      <!-- 查看更多回复按钮 -->
      <button class="toggle-replies">
        <i class="fa fa-angle-down"></i> 查看更多留言
      </button>
    </div>
  </div>
  
  <!-- 操作按钮区 -->
  <div class="action-buttons">
    <button class="action-btn btn-secondary" id="call-btn">
      <i class="fa fa-phone"></i> 电话咨询
    </button>
    <button class="action-btn btn-secondary" id="online-btn">
      <i class="fa fa-comments"></i> 在线咨询
    </button>
    <button class="action-btn btn-primary" id="contact-btn">
      <i class="fa fa-user"></i> 留下联系方式
    </button>
  </div>
  
  <!-- 联系表单弹窗 -->
  <div class="modal-backdrop" id="contact-modal">
    <div class="modal-content">
      <div class="modal-header">
        <h3 class="modal-title">留下您的联系方式</h3>
        <button class="close-modal" id="close-modal">&times;</button>
      </div>
      <form id="contact-form">
        <div class="form-group">
          <label class="form-label">姓名</label>
          <input type="text" class="form-control" placeholder="请输入您的姓名">
        </div>
        <div class="form-group">
          <label class="form-label">手机号码</label>
          <input type="tel" class="form-control" placeholder="请输入您的手机号码">
        </div>
        <div class="form-group">
          <label class="form-label">所在城市</label>
          <input type="text" class="form-control" placeholder="请输入您所在的城市">
        </div>
        <div class="form-group">
          <label class="form-label">留言</label>
          <textarea class="form-control" rows="3" placeholder="请输入您想了解的问题..."></textarea>
        </div>
        <button type="button" class="submit-btn" id="submit-contact">提交</button>
      </form>
    </div>
  </div>

  <!-- Bootstrap JS -->
  <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
  
  <script>
    // 图片轮播功能
    const galleryDots = document.querySelectorAll('.gallery-dot');
    const galleryImage = document.querySelector('.gallery-image');
    const imageCount = document.querySelector('.image-count');
    let currentImage = 0;
    const totalImages = 5;
    
    // 模拟图片切换
    galleryDots.forEach((dot, index) => {
      dot.addEventListener('click', () => {
        galleryDots.forEach(d => d.classList.remove('active'));
        dot.classList.add('active');
        currentImage = index;
        imageCount.textContent = `${currentImage + 1}/${totalImages}`;
        galleryImage.src = `https://picsum.photos/800/600?random=${20 + currentImage}`;
      });
    });
    
    // 自动轮播
    setInterval(() => {
      currentImage = (currentImage + 1) % totalImages;
      galleryDots.forEach(d => d.classList.remove('active'));
      galleryDots[currentImage].classList.add('active');
      imageCount.textContent = `${currentImage + 1}/${totalImages}`;
      galleryImage.src = `https://picsum.photos/800/600?random=${20 + currentImage}`;
    }, 5000);
    
    // 收藏功能
    const favoriteBtn = document.getElementById('favorite-btn');
    favoriteBtn.addEventListener('click', function() {
      const icon = this.querySelector('i');
      if (icon.classList.contains('fa-heart-o')) {
        icon.classList.remove('fa-heart-o');
        icon.classList.add('fa-heart');
        icon.style.color = '#ff4d4f';
        alert('收藏成功');
      } else {
        icon.classList.remove('fa-heart');
        icon.classList.add('fa-heart-o');
        icon.style.color = '';
        alert('已取消收藏');
      }
    });
    
    // 分享功能
    const shareBtn = document.getElementById('share-btn');
    shareBtn.addEventListener('click', function() {
      alert('分享功能：可以分享到微信、朋友圈、QQ等平台');
    });
    
    // 电话咨询
    const callBtn = document.getElementById('call-btn');
    callBtn.addEventListener('click', function() {
      alert('客服电话：400-123-4567');
      // 实际应用中可以使用tel:协议直接拨打电话
      // window.location.href = 'tel:4001234567';
    });
    
    // 在线咨询
    const onlineBtn = document.getElementById('online-btn');
    onlineBtn.addEventListener('click', function() {
      alert('正在为您连接在线客服...');
    });
    
    // 联系表单弹窗
    const contactModal = document.getElementById('contact-modal');
    const contactBtn = document.getElementById('contact-btn');
    const closeModal = document.getElementById('close-modal');
    const submitContact = document.getElementById('submit-contact');
    
    contactBtn.addEventListener('click', function() {
      contactModal.classList.add('show');
    });
    
    closeModal.addEventListener('click', function() {
      contactModal.classList.remove('show');
    });
    
    contactModal.addEventListener('click', function(e) {
      if (e.target === contactModal) {
        contactModal.classList.remove('show');
      }
    });
    
    submitContact.addEventListener('click', function() {
      // 简单验证
      const name = document.querySelector('input[placeholder="请输入您的姓名"]').value;
      const phone = document.querySelector('input[placeholder="请输入您的手机号码"]').value;
      
      if (!name) {
        alert('请输入您的姓名');
        return;
      }
      
      if (!phone || phone.length !== 11) {
        alert('请输入正确的手机号码');
        return;
      }
      
      alert('提交成功！我们会尽快与您联系');
      contactModal.classList.remove('show');
      document.getElementById('contact-form').reset();
    });
    
    // 留言功能
    const commentInput = document.querySelector('.comment-input');
    const sendComment = document.querySelector('.send-comment');
    
    sendComment.addEventListener('click', function() {
      const commentText = commentInput.value.trim();
      if (commentText) {
        alert('留言成功！等待回复');
        commentInput.value = '';
        
        // 实际应用中这里会发送留言到服务器
      } else {
        alert('请输入留言内容');
      }
    });
    
    // 留言点赞功能
    const likeButtons = document.querySelectorAll('.comment-action');
    likeButtons.forEach(button => {
      if (button.querySelector('i').classList.contains('fa-thumbs-o-up')) {
        button.addEventListener('click', function() {
          const icon = this.querySelector('i');
          const countText = this.childNodes[2].textContent.trim();
          let count = parseInt(countText) || 0;
          
          if (icon.classList.contains('fa-thumbs-o-up')) {
            icon.classList.remove('fa-thumbs-o-up');
            icon.classList.add('fa-thumbs-up');
            this.classList.add('active');
            this.childNodes[2].textContent = ` ${count + 1}`;
          } else {
            icon.classList.remove('fa-thumbs-up');
            icon.classList.add('fa-thumbs-o-up');
            this.classList.remove('active');
            this.childNodes[2].textContent = ` ${count - 1}`;
          }
        });
      }
    });
    
    // 回复功能
    const replyButtons = document.querySelectorAll('.comment-action');
    replyButtons.forEach(button => {
      if (button.querySelector('i').classList.contains('fa-reply')) {
        button.addEventListener('click', function() {
          const author = this.closest('.comment-content').querySelector('.comment-author').textContent;
          commentInput.value = `回复 @${author}：`;
          commentInput.focus();
        });
      }
    });
    
    // 查看更多留言
    const toggleReplies = document.querySelector('.toggle-replies');
    toggleReplies.addEventListener('click', function() {
      const icon = this.querySelector('i');
      if (icon.classList.contains('fa-angle-down')) {
        icon.classList.remove('fa-angle-down');
        icon.classList.add('fa-angle-up');
        this.textContent = ' 收起留言';
        this.prepend(icon);
        // 实际应用中这里会加载更多留言
        alert('已加载全部留言');
      } else {
        icon.classList.remove('fa-angle-up');
        icon.classList.add('fa-angle-down');
        this.textContent = ' 查看更多留言';
        this.prepend(icon);
      }
    });
  </script>
</body>
</html>
